load("@rules_rust//rust:defs.bzl", "rust_doc_test", "rust_library")

package(default_visibility = ["//visibility:public"])

rust_library(
    name = "phantom_newtype",
    srcs = glob(["src/**"]),
    deps = [
        # Keep sorted.
        "//packages/ic-heap-bytes",
        "@crate_index//:candid",
        "@crate_index//:num-traits",
        "@crate_index//:serde",
        "@crate_index//:slog",
    ],
)

rust_doc_test(
    name = "phantom_newtype_doctest",
    crate = ":phantom_newtype",
    deps = ["@crate_index//:serde_json"],
)
